CC	= g++

SRCEXTS	= .cpp
HDREXTS	= .h
OBJEXTS	= .o

CFLAGS	= -fopenmp

OBJDIR	= bin

PROGRAM = main

SOURCES	= main.cpp loader.cpp palins.cpp parser.cpp Crivo.cpp
HEADERS	= loader.h palins.h parser.h Crivo.h
OBJS	= main.o loader.o palins.o parser.o Crivo.o

all: $(PROGRAM)

objs: $(OBJS)

$(OBJEXTS):%$(SRCEXTS) $(HEADERS)
	mkdir $(dir $@) -p
	$(CC) -c $< -o $@ $(CFLAGS)

$(PROGRAM):$(OBJS)
	$(CC) $(OBJS) -o $@
	rm -rf *.o
	@echo Digite ./$(PROGRAM) para executar a versao sequencial.

exec:
	./$(PROGRAM)
